package tech.aiflowy.starter;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;

public class ParameterTest {
    public static void main(String[] args) throws NoSuchMethodException {
        Method method = ParameterTest.class.getMethod("demoMethod", String.class, int.class);
        Parameter[] parameters = method.getParameters();
        for (Parameter param : parameters) {
            System.out.println("参数名: " + param.getName());
        }
    }

    public static void demoMethod(String param1, int param2) {}
}

